package cn.huoyingkeji.system.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;

import cn.huoyingkeji.common.domain.DTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * 实体类
 */
@Data
@Schema(description = "租户")
public class TenantDTO extends DTO {

	private static final long serialVersionUID = 1L;

	/**
	 * ID
	 */
	@JsonSerialize(nullsUsing = NullSerializer.class)
	@Schema(description = "ID")
	private Long id;
	/**
	 * 租户ID
	 */
	@Schema(description = "租户ID")
	private String tenantId;
	/**
	 * 租户名称
	 */
	@Schema(description = "租户名称")
	private String tenantName;
	/**
	 * 域名地址
	 */
	@Schema(description = "域名地址")
	private String domainUrl;
	/**
	 * 系统背景
	 */
	@Schema(description = "系统背景")
	private String backgroundUrl;
	/**
	 * 联系人
	 */
	@Schema(description = "联系人")
	private String linkman;
	/**
	 * 联系电话
	 */
	@Schema(description = "联系电话")
	private String contactNumber;
	/**
	 * 联系地址
	 */
	@Schema(description = "联系地址")
	private String address;
	/**
	 * 账号额度
	 */
	@Schema(description = "租账号额度户")
	private Integer accountNumber;
	/**
	 * 过期时间
	 */
	@Schema(description = "过期时间")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date expireTime;
	/**
	 * 产品包ID
	 */
	@Schema(description = "产品包ID")
	@JsonSerialize(nullsUsing = NullSerializer.class)
	private Long packageId;
	/**
	 * 数据源ID
	 */
	@Schema(description = "数据源ID")
	@JsonSerialize(nullsUsing = NullSerializer.class)
	private Long datasourceId;
	/**
	 * 授权码
	 */
	@Schema(description = "授权码")
	private String licenseKey;

}
